package com.win.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.win.pojo.vo.Useruploadlog;
import com.win.service.UseruploadlogService;
import com.win.mapper.UseruploadlogMapper;
import com.win.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
* @author 54478
* @description 针对表【useruploadlog】的数据库操作Service实现
* @createDate 2024-05-23 08:41:14
*/
@Service
public class UseruploadlogServiceImpl extends ServiceImpl<UseruploadlogMapper, Useruploadlog>
    implements UseruploadlogService{

    @Autowired
    private UseruploadlogMapper logMapper;

    @Override
    public void addLog(Useruploadlog log) {
        logMapper.add(log);
    }

    @Override
    public Result getLog() {
        List<Useruploadlog> logsList = logMapper.selectList(null);
        Map<String,List<Useruploadlog>> map = new HashMap<>();
        map.put("logInfo",logsList);
        return Result.ok(map);
    }
}




